<template>
  <div>
     <home-swiper v-if="clickObj" :messageid="clickObj"></home-swiper>
  </div>
</template>

<script>
import Client from '../assets/js/common';
import hgjSkip from '../assets/js/hgjSkip';
import homeSwiper from './homeSwiper';
import { Toast } from "mint-ui";
export default {
  components: {
    homeSwiper
  },
  data() {
    return {
      clickObj: null
    };
  },
  created(){
    hgjSkip.skip().then(res =>{
      let urlJSON = this.$route.query.obj;
      let objs = null;
      if(urlJSON){
        objs = JSON.parse(decodeURIComponent(this.$route.query.obj));
      }else{
        let urlID = this.$route.query.id,
            urlIndex = this.$route.query.index,
            urlType = this.$route.query.type,
            urlGoBack = this.$route.query.goback;
            objs = {id:urlID,index:urlIndex,type:urlType,goBack:urlGoBack};        
      }
      objs = {...objs,...res[0]};
      this.$store.commit('clickObj', objs);
      this.clickObj = objs;
    });
  },
  mounted() {
    
  },
  methods: {
  }
};
</script>
<style lang="less"scoped>
</style>
